from threading import Thread

'''
简单的创建线程案例
'''

# 创建任务
def func(name):
    for i in range(100):
        print(name, i)


if __name__ == '__main__':
    # target，要执行的函数；args，参数（元组）
    t1 = Thread(target=func, args=('周杰伦',))
    t2 = Thread(target=func, args=('王力宏',))
    t3 = Thread(target=func, args=('孙燕姿',))

    t1.start()
    t2.start()
    t3.start()

    print('我是主线程')